/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.userpay.service;

import java.util.List;

import com.jeeplus.modules.userbank.entity.Userbank;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.userpay.entity.Userpay;
import com.jeeplus.modules.userpay.mapper.UserpayMapper;

/**
 * 用户支付宝Service
 * @author freedom
 * @version 2020-09-26
 */
@Service
@Transactional(readOnly = true)
public class UserpayService extends CrudService<UserpayMapper, Userpay> {

	public Userpay get(String id) {
		return super.get(id);
	}
	
	public List<Userpay> findList(Userpay userpay) {
		return super.findList(userpay);
	}
	
	public Page<Userpay> findPage(Page<Userpay> page, Userpay userpay) {
		dataRuleFilter(userpay);
		userpay.setPage(page);
		List<Userpay> list = mapper.findPayList(userpay);
		page.setList(list);
		return page;
//		return super.findPage(page, userpay);
	}
	
	@Transactional(readOnly = false)
	public void save(Userpay userpay) {
		super.save(userpay);
	}
	
	@Transactional(readOnly = false)
	public void delete(Userpay userpay) {
		super.delete(userpay);
	}

	public Userpay getByMember(String memberid) {
		
		return mapper.getByMember(memberid);
	}
	
}